home *** CD-ROM | disk | FTP | other *** search
- On 23-May-97, Branko Collin sat on a keyboard and produced this mess:
-
- > Another thing: I read on this list some time ago an optimisation tip for map
- > based games, which was to store the map as many times as there are directions
- > you can scroll in. The advantage being, that you can then lay out the map in
- > memory in such a way that you have only to increase the pointer to read the
- > next tile.
-
- > So a scroll to the left would be done
- > PTR=??? 'position on the map
- > For Y=1 To HEIGHT
- > Inc PTR
- > TILE=Peek(PTR)
- > _PASTE_TILE(X,Y,TILE)
- > Next Y
-
- > Rather than:
- > For Y=1 To HEIGHT
- > TILE=Peek(_START+X+Y*WIDTH)
- > _PASTE_TILE(X,Y,TILE)
- > Next Y
-
- > The optimisation bit lies in the fact that you don't have much of a
- > calculation to determine where to read the next tile from. I don't know if it
- > works, as I have never tried it, but it seems genuine enough.
-
- Yeah, that's possible... but it could also work as:
-
- PTR=Position on map
- For Y=1 To HEIGHT
- Add PTR,MAP_WIDTH
- TILE=Peek(PTR)
- _PASTE_TILE[X,Y,TILE]
- Next Y
-
- ...and then I think it only needs ONE map bank.
-
- > How would you deal with such things in your proposed extension?
-
- However it is handled, it should be handled internally!
-
- Bye ____________________________________________________
- / \
- / Ben Wyatt - bwyatt@paston.co.uk or b.wyatt@uea.ac.uk \
- \ http://www.paston.co.uk/users/bwyatt/index.html /
- \____________________________________________________/
- (c)1995-97 Very Interesting Signatures Ltd.
-
-
-